package HLLibClasses;

import HLCode.HLClassManager;
import HLCode.HLLibClass;
import HLCode.HLObject;
import HLLib.base.HLString;
import HLLib.social.HLGameCenter;

public class HLClassGameCenter extends HLLibClass {
    public HLClassGameCenter(HLClassManager owner) {
        super(owner);
    }

    public HLObject NewObject() {
        return new HLGameCenter();
    }

    public void StaticExecute(int index, HLObject args, HLObject resultOwnerObject, int resultIndex) {
        switch (index) {
        case 0: {
            if (resultOwnerObject == null) {
                HLGameCenter.Login();
            } else {
                resultOwnerObject.SetBoolean(resultIndex, HLGameCenter.Login());
            }
            break;
        }
        case 1: {
            HLGameCenter.GetFriendsInfoGameCenter();
            break;
        }
        case 2: {
            HLGameCenter.ShowLeadboard();
            break;
        }
        case 3: {
            HLGameCenter.ReportScore((HLString)args.GetObject(0), args.GetInt(0));
            break;
        }
        case 4: {
            HLGameCenter.ShowAchievements();
            break;
        }
        case 5: {
            HLGameCenter.ReportAchievement((HLString)args.GetObject(0), args.GetInt(0));
            break;
        }
        case 6: {
            HLGameCenter.ResetAchievements();
            break;
        }
        case 7: {
            HLGameCenter.LoadAchievements();
            break;
        }
        }
    }
}
